﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace WEBSITE.BLL
{
    public class KhachHangBLL
    {
        ProshopService.ProshopServiceClient client = new ProshopService.ProshopServiceClient();

        public DataSet getThongTinKH(int makh)
        {
            try
            {
                return client.getThongTinKH(makh);
            }
            catch (Exception)
            {
                
                return null;
            }
        }

        public bool updateThongTinKH(int makh, string pw, string hoten, bool gioitinh, string email, string diachi, string dienthoai, string cauhoi, string traloi, bool status)
        {
            try
            {
                return client.updateThongTinKH(makh, pw, hoten, gioitinh, email, diachi, dienthoai, cauhoi, traloi, status);
            }
            catch (Exception)
            {

                return false;
            }
        }

        public bool themKH(string tendn, string pw, string hoten, bool gioitinh, string email, string diachi, string dienthoai, string cauhoi, string traloi, bool status)
        {
            try
            {
                return client.themKH(tendn, pw, hoten, gioitinh, email, diachi, dienthoai, cauhoi, traloi, status);
            }
            catch (Exception)
            {

                return false;
            }
        }
    }
}